package com.hkd.user_service.api;

import com.hkd.common.api.ApiResponse;
import com.hkd.user_service.api.entity.SysRoleMenu;
import com.hkd.user_service.api.fallback.SysRoleMenuServiceImplFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author HKD
 * @date 2022/8/20 18:11
 */
//@Component
@FeignClient(name = "user-service",
        contextId = "SysRoleMenuService",
        fallbackFactory = SysRoleMenuServiceImplFallback.class
)
public interface SysRoleMenuService {
    @PostMapping("insertAll")
    ApiResponse insertAll(@RequestBody List<SysRoleMenu> roleMenus);
}
